import java.util.Scanner;

public class MallTest {
    public static void main(String[] args) {
        Scanner input=new Scanner(System.in);
        Mall mall=new Mall();
        mall.mallName="子梅超市";
        mall.adresss="天水路56号";
        while (true){
            System.out.println("1.添加会员");
            System.out.println("2.显示会员信息");
            System.out.println("3.显示商场信息");
            System.out.println("4.添加会员积分");
            System.out.println("5.积分兑换商品");
            System.out.println("0.输入0退出");
            int choice=input.nextInt();
            switch (choice){
                case 1:
                    System.out.println("请输入您要添加的会员号");
                    String cardNo=input.next();
                    System.out.println("请输入姓名");
                    String name=input.next();
                    System.out.println("请输入会员电话号码");
                    String number=input.next();
                    int score=0;
                    mall.add(cardNo,name,number,score);
                    break;
                    case 2:
                        mall.show();
                        break;
                case 3:
                    mall.shoMall();
                    break;
                case 4:
                    System.out.println("请输入您要添加会员积分的会员卡号");
                    String cardNo1=input.next();
                    System.out.println("请输入您要添加的会员积分");
                    int score1=input.nextInt();
                    mall.increaseScore(cardNo1,score1);
                    break;
                case 5:
                    System.out.println("请输入会员号");
                    String cardNo2=input.next();
                    System.out.println("请输入您要兑换的商品编号");
                    System.out.println("1.100积分兑换餐巾纸一包");
                    System.out.println("2.400积分兑换剃须刀一把");
                    System.out.println("3.1000积分兑换铁锅一个");
                    int no=input.nextInt();
                    mall.exchange(cardNo2,no);
                    break;
                    default:
                        break;


            }
            if (choice==0){
                System.out.println("退出系统");
                break;
            }
        }
    }
}
